package net.sashag.nadlandroid;

import android.content.Context;
import android.content.res.Resources;
import android.widget.LinearLayout;

import com.google.android.maps.MapView;

public class MapViewHelper {

	public static MapView createMapView(Context context, LinearLayout placeholder) {
		Resources resources = context.getResources();
		MapView mapView;
		if (DebugBuildHelper.isRunningDebugBuild(context)) {
			mapView = new MapView(context, resources.getString(R.string.mapsApiKey));
		} else {
			mapView = new MapView(context, resources.getString(R.string.mapsApiKeyRelease));
		}
		placeholder.addView(mapView);
		return mapView;
	}
	
}
